<?
if(isset($table_name)){
    if($table_name!=""){
	include("include/config.inc");
	include("include/conn_db.inc");
    	$sql="SELECT * FROM ".$db_array[$table_name];
    	$result=mysql_query($sql, $conn_db);
	while($res=mysql_fetch_array($result)){
	    if($res["default_val"]=="")continue;
	    $sql="UPDATE ".$db_array[$table_name]." SET commented='0', var_val='".$res["default_val"]."' WHERE id=".$res["id"];
	    if($res["default_val"]=="commented")
		$sql="UPDATE ".$db_array[$table_name]." SET commented='1' WHERE id=".$res["id"];
	    $result1=mysql_query($sql);
	}
	if(mysql_error()){
	    echo "alert('".addslashes(mysql_error())."');";
	}
	else
	    echo "alert('Set default value.');click_sub('".$table_name."');";
    }
}
?>